<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Vue中使用animate.css库</title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="css/animate.css"/>
		<style type="text/css">
		/* 自写动画
		@keyframes bounce-in{
			0% {
				transform: scale(0);
			}
			50% {
				transform: scale(1.5);
			}
			100% {
				transform: scale(1);
			}
		} */
		
			/* .fade-enter-active{
				transform-origin: left center;
				animation: bounce-in 1s;
			}
			.fade-leave-active{
				transform-origin: left center;
				animation: bounce-in 1s reverse;
			} */		
		</style>
	</head>
	<body>
		<div id="app">
			<!-- enter-active-class="animated 效果" （入场效果）
			leave-active-class="animated 效果" （出场效果）-->
			<transition name="fade" enter-active-class="animated swing" leave-active-class="animated shake">
				<div v-show="show">
					<h1>hello world</h1>
				</div>
			</transition>
			<button type="button" @click="handleClick">
				toggle
			</button>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:"#app",
				data:{
					show: true
				},
				methods:{
					handleClick: function(){
						this.show = !this.show;
					}
				}
			});
		</script>
	</body>
</html>
